/*
 * Copyright (c) 2020 - 2021 IoT Company of Midea Group.
 *
 * File Name 	    : ms_hal_wdt.h
 * Description	    : HAL adaptor for watchdog
 *
 * Version	        : v0.1
 * Author			: -
 * Date	            : 2020/12/28
 * History	        : -
 */

#ifndef __MS_HAL_WTD_H__
#define __MS_HAL_WTD_H__

#include <stdint.h>
#include "ms_hal.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief init wdt
* @param  timeout_ms : wdt timeout in 5000~60000ms, default 40s
* @return ms_hal_result_t
**/
ms_hal_result_t ms_hal_wdt_init(uint32_t timeout_ms);

/**
* @brief start wdt
* @param  null
* @return ms_hal_result_t
**/
ms_hal_result_t ms_hal_wdt_start(void);

/**
* @brief feed wdt
* @param  null
* @return ms_hal_result_t
**/
ms_hal_result_t ms_hal_wdt_refresh(void);

/**
* @brief stop wdt
* @param  null
* @return ms_hal_result_t
**/
ms_hal_result_t ms_hal_wdt_stop(void);

#ifdef __cplusplus
}
#endif

#endif

